package com.shanzhu.flower.service.impl;

import com.shanzhu.flower.dao.PurchaseDao;
import com.shanzhu.flower.entity.Purchase;
import com.shanzhu.flower.service.PurchaseService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class PurchaseServiceImpl implements PurchaseService {
    @Resource
    private PurchaseDao purchaseDao;

    @Override
    public List<Purchase> findAll() {
        return purchaseDao.findAll();
    }

    @Override
    public int add(Purchase purchase) {
        return purchaseDao.add(purchase);
    }

    @Override
    public int update(Purchase purchase) {
        return purchaseDao.update(purchase);
    }

    @Override
    public int delete(int id) {
        return purchaseDao.delete(id);
    }

    @Override
    public List<Purchase> findPage(String searchKey, int offset, int pageSize) {
        return purchaseDao.findPage(searchKey, offset, pageSize);
    }
    @Override
    public int count(String searchKey) {
        return purchaseDao.count(searchKey);
    }
} 